import UIKit

extension Date {
    
    public var millisecond: CLongLong {
        let timeInterval: TimeInterval = self.timeIntervalSince1970
        let millisecond = CLongLong(round(timeInterval*1000))
        return millisecond
    }
    
    public var microsecond: CLongLong {
        let timeInterval: TimeInterval = timeIntervalSince1970
        let microsecond = CLongLong(round(timeInterval*1000*1000))
        return microsecond
    }
}
